<!DOCTYPE html>
<html xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-bind="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">
    <title>个人中心</title>
    <link rel="stylesheet" href="../lib/basic/css/bootstrap.min.css">
    <link href="../lib/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
    <link href="../lib/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">
    <link href="../home/css/personal.css" rel="stylesheet" type="text/css">
    <link href="../home/css/orstyle.css" rel="stylesheet" type="text/css">
    <link href="../home/css/systyle.css" rel="stylesheet" type="text/css">
    <link type="text/css" href="../home/css/sellsenter.css" rel="stylesheet"/>
    <link rel="stylesheet" type="text/css" href="../lib/elementui/1.4.3/theme-default/index.css">
    <script src="../lib/AmazeUI-2.4.2/assets/js/jquery.min.js"></script>
    <script src="../lib/AmazeUI-2.4.2/assets/js/amazeui.js"></script>
    <script src="../home/js/bootstrap.min.js"></script>
    <script src="../home/js/vue.min.js"></script>
    <script src="../lib/elementui/1.4.3/index.js"></script>
    <script src="../home/js/echarts.js"></script>
</head>
<body>
<div id="indexs">
    <!--头 -->
    <header>
        <article>
            <iframe  MARGINWIDTH="0" MARGINHEIGHT="0" height="50px" scrolling="no"  width="100%" src="../home/otherHead.html"></iframe>
        </article>
    </header>


    <b class="line"></b>
    <div  style="margin-right: 0px;margin-left: 0px;">
        <div class="col-main">
            <div class="main-wrap">
                <div id="wrap-left">
                    <div class="wrap-list">
                        <div class="m-user">
                            <!--个人信息 -->
                            <div class="s-bar">
                                <i class="s-icon"></i>个人信息
                            </div>
                            <ul class="m-userinfo">
                                <li style="margin-right: 120px;width: 200px;">帐号：<span>{{LoginUser.username}}</span></li>
                                <li style="margin-right: 192px;">用户名：<span>{{LoginUser.name}}</span></li>
                                <li class="qtitem " id="qtitem" data-toggle="modal" data-target="#exampleModal">
                                    <input type="button" id="UpdatePwd" class=" am-round " value="修改密码"/>
                                </li>
                                <li class="modal-footer" id="warnInfo" data-toggle="modal" data-target="#WarnModal">
                                    <el-badge v-bind:value="warnList.length" :max="99" class="item">
                                        <el-button type="button" size="small"  id="warn" class="btn am-btn-warning am-round" data-dismiss="modal"><span style="color: #FFFFFF">预警</span></el-button>
                                    </el-badge>
                                </li><br>
                                <li style="margin-right: 120px;">邮箱：<span>{{LoginUser.email}}</span></li>
                                <li style="margin-right: 120px;">联系电话：<span>{{LoginUser.telephone}}</span></li>
                            </ul>
                        </div>
                        <div>待办事项：<a  href="javascript:void(0);" v-on:click="queryPurchaseDetailList"><span style="color: #ff7000" v-if="userRole.authority == 'unit'">申请{{strs.sqNum}}个</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="javascript:void(0);" v-on:click="purchaseOrdersEnterExamine"><span style="color: #ff7000" v-if="userRole.authority == 'office'">待审核{{strs.dshNum}}个</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="javascript:void(0);" v-on:click="purchaseOrdersQuotation"><span style="color: #ff7000" v-if="userRole.authority == 'unit'">待询价{{strs.dxjNum}}个</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="javascript:void(0);" v-on:click="personOffers" ><span style="color: #ff7000" v-if="userRole.authority == 'finalist'">待报价{{strs.dbjNum}}个</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="javascript:void(0);" v-on:click="personOffersList" ><span style="color: #ff7000" v-if="userRole.authority == 'unit'">待确认询价{{strs.dqrNum}}个</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="javascript:void(0);" v-on:click="queryPurchaseAndOrdesdetail" ><span style="color: #ff7000">合同及其通知书{{strs.zsNum}}个</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="javascript:void(0);" v-on:click="purchaseOrdersEnter" ><span style="color: #ff7000" v-if="userRole.authority == 'unit'">待完成{{strs.dwcNum}}个</span></a>&nbsp;&nbsp;&nbsp;&nbsp;
                            <a href="javascript:void(0);" v-on:click="shopEnterExamine"><span style="color: #ff7000" v-if="userRole.authority == 'office'">待审核商家{{strs.dshsjNum}}个</span></a></div>
                        <div class="box-container-bottom"></div>
                       <div >
                            <div class="s-bar">
                                <i class="s-icon"></i>数据统计
                                <a class="i-load-more-item-shadow" href="#">平台成交总价格：{{totalMoney}}元  市场价格{{bazaarMoney}}元 节省资金{{spare}}元</a>
                            </div>
                           <el-row class="tac">
                               <el-col :span="12">
                                    <div id="pieChart" style="height: 500px;width: 100%" align="center"></div>
                               </el-col>
                               <el-col :span="12">
                                   <div id="histogram" style="height: 500px;width: 100%" align="center"></div>
                               </el-col>
                           </el-row>

                        </div>



                    </div>
                </div>

            </div>


        </div>

        <aside class="menu">

            <el-row class="tac">
                <el-col :span="24">
                    <el-menu default-active="2" class="el-menu-vertical-demo" @open="handleOpen" @close="handleClose">
                        <el-menu-item index="1" v-on:click="manageIndex();"><i class="am-icon-gear am-icon-fw"></i>管理中心</el-menu-item>
                        <el-submenu index="2" v-if="userRole.authority == 'office' || userRole.authority == 'seed_admin'">
                            <template slot="title"><i class="am-icon-user am-icon-fw"></i>用户管理</template>
                            <el-menu-item-group>
                                <template slot="title" ><a href="javascript:void(0);" v-on:click="onUser();">账号管理</a></template>
                            </el-menu-item-group>

                        </el-submenu>
                        <el-submenu index="3" v-if="userRole.authority == 'office' || userRole.authority == 'seed_admin'">
                            <template slot="title"><i class="am-icon-edit am-icon-fw"></i>审批管理</template>
                            <el-menu-item-group>
                                <template slot="title" ><a href="javascript:void(0);" v-on:click="purchaseOrdersEnterExamine">采购单审批</a></template>
                            </el-menu-item-group>

                            <el-menu-item-group>
                                <template slot="title" ><a href="javascript:void(0);" v-on:click="shopEnterExamine">商家入驻审批</a></template>
                            </el-menu-item-group>

                        </el-submenu>
                        <el-submenu index="4" >
                            <template slot="title"><i class="am-icon-line-chart am-icon-fw"></i>数据统计</template>
                            <el-menu-item-group v-if="userRole.authority == 'office'">
                                <template slot="title" ><a href="javascript:void(0);" v-on:click="statistical(1)">采购单位统计</a></template>
                            </el-menu-item-group>
                            <el-menu-item-group v-if="userRole.authority == 'office'">
                                <template slot="title" ><a href="javascript:void(0);" v-on:click="statistical(0)">商家数据统计</a></template>
                            </el-menu-item-group>
                            <el-menu-item-group v-if="userRole.authority == 'unit'">
                                <template slot="title" ><a href="javascript:void(0);" v-on:click="statistical(2)">采购统计报表</a></template>
                            </el-menu-item-group>
                            <el-menu-item-group v-if="userRole.authority == 'finalist'">
                                <template slot="title" ><a href="javascript:void(0);" v-on:click="statistical(3)">采购统计报表</a></template>
                            </el-menu-item-group>
                        </el-submenu>
                        <el-submenu index="5" v-if="userRole.authority == 'office' || userRole.authority == 'seed_admin'">
                            <template slot="title"><i class="am-icon-suitcase am-icon-fw"></i>业务管理</template>
                            <el-menu-item-group>
                                <template slot="title" ><a href="javascript:void(0);" id="notice" v-on:click="onNotice">公告管理</a></template>
                            </el-menu-item-group>
                           <!-- <el-menu-item-group>
                                <template slot="title" ><el-badge v-bind:value="warnList.length" :max="99" class="item">
                                    <a href="javascript:void(0);" v-on:click="">预警信息</a>
                                </el-badge></template>
                            </el-menu-item-group> -->

                        </el-submenu>

                        <el-submenu index="6" >
                            <template slot="title"><i class="am-icon-server am-icon-fw"></i>采购单管理</template>
                            <el-menu-item-group v-if="userRole.authority == 'unit' ">
                                <template slot="title" ><a  href="javascript:void(0);" v-on:click="queryPurchaseDetailList">待审核采购单</a></template>
                            </el-menu-item-group>
                            <el-menu-item-group v-if="userRole.authority == 'unit'">
                                <template slot="title" ><a  href="javascript:void(0);" v-on:click="purchaseOrdersQuotation">采购清单管理</a></template>
                            </el-menu-item-group>
                            <el-menu-item-group v-if="userRole.authority == 'finalist'">
                                <template slot="title" ><a  href="javascript:void(0);" v-on:click="personOffers" >报价单管理</a></template>
                            </el-menu-item-group>
                            <el-menu-item-group v-if="userRole.authority == 'unit'||userRole.authority == 'office'">
                                <template slot="title" ><a href="javascript:void(0);" v-on:click="personOffersList" >询价结果管理</a></template>
                            </el-menu-item-group>
                            <el-menu-item-group v-if="userRole.authority == 'unit'">
                                <template slot="title" ><a href="javascript:void(0);" v-on:click="purchaseOrdersEnter" >订单完成</a></template>
                            </el-menu-item-group>
                            <el-menu-item-group >
                                <template slot="title" ><a href="javascript:void(0);" id="detail"  v-on:click="queryPurchaseAndOrdesdetail" >采购单详细查询</a></template>
                            </el-menu-item-group>
                            <el-menu-item-group >
                                <template slot="title" ><a href="javascript:void(0);"  v-on:click="addressManagerList" >地址管理</a></template>
                            </el-menu-item-group>

                        </el-submenu>
                        <el-submenu index="7" v-if="userRole.authority == 'finalist'">
                            <template slot="title"><i class="am-icon-bank am-icon-fw"></i>店铺管理</template>
                            <el-menu-item-group>
                                <template slot="title" ><a href="javascript:void(0);" v-on:click="companyInformation">我的店铺</a></template>
                            </el-menu-item-group>


                        </el-submenu>

                    </el-menu>
                </el-col>

            </el-row>
        </aside>
    </div>
<div>
    <iframe  MARGINWIDTH="0" MARGINHEIGHT="0" height="50px" width="100%" scrolling="no"  src="../home/otherFoot.html"></iframe>
</div>

    <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
        <div class="modal-dialog" role="document" style="margin-left: 0px;">
            <div class="modal-content" style=" height:380px;margin: auto auto;margin-top: -80px;width: 600px;">
                <div class="modal-body" style="margin-top: 20px;">
                    <div class="form-group">
                        <a href="#" class="am-close" data-dismiss="modal"style="float: right;margin-top: -20px;">&times;</a>
                        <h1 for="message-text" class="control-label" style="text-align: center;font-size: 20px;margin-bottom: 20px;margin-left: 20px;">修改密码</h1>
                        <form id="fom" style="margin: auto;width: 500px;">
                            <div id="div4">
                                <span style="color: red;">*</span>原&nbsp;&nbsp;密&nbsp;&nbsp;码&nbsp;:&nbsp;
                                <input v-model="pwd.original" onkeyup="v_original();" id="input1"
                                       style="background-color: #FFFFFF" type="password"/>
                                <img id="img-icon1-11" src="../lib/images/icon-1.png"><img id="img-icon1-12"
                                                                                           src="../lib/images/icon-2.png">
                                <span id="tab3-1"></span>
                            </div>
                            <div style="margin-top: 35px;">
                                <span style="color: red">*</span>新&nbsp;&nbsp;密&nbsp;&nbsp;码&nbsp;:&nbsp;
                                <input v-model="pwd.new" id="input2" onkeyup="v_new();" type="password"/>
                                <img id="img-icon2-11" src="../lib/images/icon-1.png"><img id="img-icon2-12" src="../lib/images/icon-2.png">
                                <span id="tab3-2"></span>
                            </div>
                            <div style="margin-top: 35px;">
                                <span style="color: red">*</span>确认密码&nbsp;:&nbsp;
                                <input v-model="pwd.again" id="input3" onkeyup="v_again();" type="password"/>
                                <img id="img-icon3-11" src="../lib/images/icon-1.png"><img id="img-icon3-12"
                                                                                           src="../lib/images/icon-2.png">
                                <span id="tab3-3"></span>
                            </div>
                            <div id="div5" align="center">
                                <div class="modal-footer">
                                    <button type="button" :plain="true" id="button"
                                            class=" am-btn  am-btn-warning am-round btn btn-default"
                                            v-on:click="updatePwd();" data-dismiss="modal">修改
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="WarnModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
        <div class="modal-dialog" role="document" style="margin-left: 0px;">
            <div class="modal-content" style="width: 600px; height:380px;margin: auto auto">
                <div id="modal-body" class="modal-body">
                    <div class="form-group">
                        <a href="#" class="am-close" data-dismiss="modal"style="float: right;">&times;</a>
                        <h1 for="message-text" class="control-label" style="text-align: center;font-size: 20px;margin-bottom: 20px;margin-left: 20px;">预警信息</h1>
                        <template>
                            <el-table :data="warnList.slice((currentPage-1)*pagesize,currentPage*pagesize)" border stripe   align="center" width="100%">
                                <el-table-column  prop="nameType" label="单位名称" show-overflow-tooltip align="center">
                                </el-table-column>
                                <el-table-column  prop="name" label="所选商品类型" show-overflow-tooltip align="center">
                                </el-table-column>
                                <el-table-column  prop="amount" label="金额" show-overflow-tooltip align="center">
                                </el-table-column>
                            </el-table>
                            <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"   :page-sizes="[10, 20, 30, 40]" :current-page.sync="currentPage" :page-size="pagesize" layout="total, prev, pager, next" :total="warnList.length" align="right" style="position: absolute;top:320px;right: 50px;"></el-pagination>
                        </template>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../charge/index.js"></script>
<script src="../charge/userPwdFrom.js"></script>
</body>
<script>
    $('#exampleModal').on('show.bs.modal', function (event) {
        var button = $(event.relatedTarget) // 触发事件的按钮
        var recipient = button.data('whatever') // 解析出data-whatever内容
        var modal = $(this)

        modal.find('.modal-body input').val(recipient)
    });
    $('#WarnModal').on('show.bs.modal', function (event) {
        var button = $(event.relatedTarget) // 触发事件的按钮
        var recipient = button.data('whatever') // 解析出data-whatever内容
        var modal = $(this)

        modal.find('.modal-body input').val(recipient)
    });
</script>
</html>